package 对象.demo01;

public class Display {
	private int value=0;
	private int limit=0;

	public Display(int limit){
		this.limit = limit;
	}

	public void increase(){
		value++;
		if (value==limit){
			value=0;
		}
		//修改原来的类(不符合开闭原则)
		//h.value++;
	}
	public int getValue(){
		return value;
	}

}
